package 行为型模式.责任链模式;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/3/8 10:57
 */

public class test {
    public static void main(String[] args) {
        LeaveRequest leaveRequest = new LeaveRequest("王音", 10, "没起床");
        //创建各级领导对象
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        groupLeader.submit(leaveRequest);
    }
}
